#include "mainwidget.h"
#include "ui_mainwidget.h"

MainWidget::MainWidget(QWidget *parent) :
    QWidget(nullptr),
    ui(new Ui::MainWidget)
{
    ui->setupUi(this);
    sled_key_widget = new IceBearLedWidget;
    this->login = parent;
}

MainWidget::~MainWidget()
{
    delete ui;
}

void MainWidget::on_pushButton_change_clicked()
{
    changeUserWidget = new ChangeUserWidget(this,login);
    changeUserWidget->show();
}


void MainWidget::on_pushButton_remove_clicked()
{
    removeUserWidget = new RemoveUserWidget(this,login);
    removeUserWidget->show();
}


void MainWidget::on_pushButton_2_clicked()
{
    led_bee_fan_widget = new led_bee_fan_Widget;
    led_bee_fan_widget->show();
}


void MainWidget::on_pushButton_3_clicked()
{

    sled_key_widget->show();
}


void MainWidget::on_pushButton_4_clicked()
{
    mqttWidget = new Mqtt;
    mqttWidget->show();
}


void MainWidget::on_pushButton_clicked()
{
    lightTempWidget = new Light_TempHum_Widget;
    lightTempWidget->show();
}

